﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Web;

namespace wnet.admin
{
    /// <summary>
    /// 静态配置类
    /// </summary>
    public static class Config
    {   /// <summary>
        /// 数据库连接字符串(私有字段)
        /// </summary>
        private static readonly string _connectionString = ConfigurationManager.AppSettings["connmysql"];
        /// <summary>
        /// 数据库连接字符串(公有属性)
        /// </summary>
        public static string ConnectionString
        {
            get { return _connectionString; }
        }
        //private static string GetCurrentProjectPath
        //{

        //    get
        //    {
        //        return Environment.CurrentDirectory.Replace(@"\bin\Debug", "");//获取具体路径
        //    }
        //}

        //static string physicalPath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
        ////  public static string ConnectionString = Path.Combine(Environment.CurrentDirectory, "SampleDB.db");
        //public static string ConnectionString = @"DataSource=" + physicalPath + @"\DataBase\Bussiness.db";
    }
}